Java Garbage Collector Performance Measurements
نویسنده
چکیده
Advances in compiler and virtual machine technologies support spread of programming environments with automated memory management, such as Java. These environments rely on garbage collection to reclaim memory that is no longer used. While in the domain of garbage collection research, every proposed garbage collector improvement is accompanied with detailed analysis of the collector overhead [Detlefs et al., 2004; Zhang and Seltzer, 2001; Blackburn, 2006], in the domain of performance modeling, the collector overhead is usually treated implicitly as a constant background factor [Xu et al., 2006; Becker et al., 2009; Kuperberg et al., 2008]. A potential reason for this treatment is lack of available information on the overhead of the garbage collector implementation. Although some implementations are open source, it is rather difficult to get such information from the code. For example, the garbage collector implementation of OpenJDK counts for more than 50000LOC. While this particular implementation is relatively well documented [Sun Microsystems, 2004], not all the information can be obtained from the documentation, and worse, the documentation contains misleading claims, such as that the JVM automatically adjusts total collector overhead to 1% of execution time [Sun Microsystems]. In order to provide a more precise collector overhead performance model, we have conducted many experiments to assess selected aspects of the garbage collector performance. Due to size constraints, the experiments are mostly reported online [Babka et al., 2009; Q-ImPrESS Consortium], and selected aspects are described in individual papers [Libič et al., 2009]. In this paper, we do not try to provide generalized claims, because the results of the experiments are bound to a particular virtual machine and collector. We do, however, compare two widely used collector implementations in the paper, and also attach notes on possible approaches towards modeling.
منابع مشابه
Compiler-Cooperative Memory Management in Java
Dynamic memory management is a known performance bottleneck of Java applications. The problem arises out of the Java memory model in which all objects (non-primitive type instances) are allocated on the heap and reclaimed by garbage collector when they are no longer needed. This paper presents a simple and fast algorithm for inference of object lifetimes. Given the analysis results, a Java comp...
متن کاملReal-Time Music synthesis in Java using the Metronome Garbage Collector
Automatic memory management via garbage collection is the key to the safety, portability, and high productivity of modern programming languages like Java. However, until now no truly real-time garbage collector has existed for Java. As a result, the extreme real-time requirements of interactive music synthesis and processing have made it impossible to build such systems in Java. We have develop...
متن کاملDesigning a Concurrent Hardware Garbage Collector for Small Embedded Systems
Today more and more functionality is packed into all kinds of embedded systems, making high-level languages, such as Java, increasingly attractive as implementation languages. However, certain aspects, essential to high-level languages are much harder to address in a low performance, small embedded system than on a desktop computer. One of these aspects is memory management with garbage collect...
متن کاملDesign Patterns in Garbage Collection
This thesis presents an examination of design patterns within the context of garbage collection. Initially, I review garbage collection and design patterns. Four garbage collectors are then examined and the design patterns found described. Both domain speci c and generic patterns are described. The domain speci c patterns are TriColour and RootSet, the generic patterns are Adaptor, Facade, Iter...
متن کاملOlder-first garbage collection in practice: evaluation in Java Virtual Machine
Until recently, the best performing copying garbage collectors used a generational policy which repeatedly collects the very youngest objects, copies any survivors to an older space, and then infrequently collects the older space. A previous study that used garbagecollection simulation pointed to potential improvements by using an Older-First copying garbage collection algorithm. The OlderFirst...
متن کامل